package com.iran.calculator.strategy.impl;


import com.iran.calculator.strategy.ISuperCash;

import java.util.HashMap;

public class ReturnCash implements ISuperCash {

    private double moneyCondition = 0d;
    private double moneyReturn = 0d;
    public ReturnCash(double moneyCondition, double moneyReturn) {
        this.moneyCondition = moneyCondition;
        this.moneyReturn = moneyReturn;
    }



    @Override
    public double acceptCash(double money) {
        return money - (int)(money / moneyCondition) * moneyReturn;
    }
}
